import request  from '@/utils/request.ts'

export interface LoginerData {
  username: string
  password: string
  role: number
}

export interface EmpData {
  username: string;
  nickname: string;
  password: string;
  name: string;
  age: number;
  salaryWishK: number;
  address: string;
  hasExperience: number;
  phone: string;
  email: string;
  eduBack: string;
  introduction: string;
  sex: number;
}

export interface CompanyData {
  username: string;
  nickName: string;
  password: string;
  companyIntroduction: string;
}

export function addLogin(loginerData: LoginerData) {
  return request.post('/login/add', loginerData);
}

export function addEmp(empData: EmpData) {
  return request.post('/emp/add', empData);
}

export function addCompany(companyData: CompanyData) {
  return request.post('/company/add', companyData);
}